<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
	    //var a=1;//定义a，并且赋值1
	    //var b=2;//定义b，并且赋值2
	    //a=b;//把b是2的值赋予a，b的值不变
	    //console.log(a);//所以输出的是2
	    //console.log(b);//和2 
	    
	    /*var a=1;
	    var b=2;
	    b=a;//把a是1的值赋予b
	    console.log(a);//所以得出的就是1
	    console.log(b);//所以得出的就是1
	    */
	   
	    /*var a=1;
	    var b=2;
	    a=b+3;//把5赋予a,b是2，b的值不变
	    b=a+4;//
	    console.log(a);//5
	    console.log(b);//9
	    */
	   
	  /* var a=1;
	   var b=2;
	   var c=3;
	   a=b+c;//将5赋予a,b.c不变
	   b=c-a;//将-2赋予b,c是3，b是2
	   c=a+b;//是3
	   console.log(a);//5
	   console.log(b);//-2
	   console.log(c);//3
	   */
	   
	   /*var a=1;
	   var b=2;
	   var c=3;
	   a=a+b;
	   b=b+a;
	   c=c+b;
	   console.log(a);//3
	   console.log(b);//5
	   console.log(c);//8
	   */
	                       //a     b
	  /*var a="1";
	  var b=2;             //"1"   2
	  a=a+b;               //"12"  2
	  b=b+a;               //"12"  "212"
	  console.log(a);
	  console.log(b);
	  */
	 
	 var a ="1+2";              //字符串
	 var b=3;
	 a=a+b;                     //拼接
	 console.log(a);//1+23      //输出1+23
	 </script>
</body>
</html>
